package weiyao.xinxidasai.DTO;

import lombok.Getter;
import lombok.Setter;

import java.sql.Date;
import java.util.ArrayList;
import java.util.List;
@Getter
@Setter
public class FileTreeNode {
    private Long id;
    private String name;
    private String type; // "folder" 或 "file"
    private String path;
    private List<FileTreeNode> children;
    // 文件特有属性
    private Long size;
    private Date uploadTime;
    private Integer filesLock;
    private String fileType;
    private String filesLockType;
    // 文件构造方法
    public FileTreeNode(Long id, String name, String type, String path,Integer filesLock) {
        this.id = id;
        this.name = name;
        this.type = type;
        this.path = path;
        this.filesLock = filesLock;
        this.children = new ArrayList<>();

    }

    public FileTreeNode(Long id, String name, String type, String path) {
        this.id = id;
        this.name = name;
        this.type = type;
        this.path = path;

        this.children = new ArrayList<>();
    }
    public FileTreeNode(Long id, String name, String type, String path,String fileType) {
        this.id = id;
        this.name = name;
        this.type = type;
        this.path = path;
this.fileType = fileType;
        this.children = new ArrayList<>();
    }
}